<template>
    <div class="ui grid form withdraw-auditfc">
        <div class="row ">
            <div class="eight wide column">
                <table class="ui celled table">
                    <tbody>
                    <tr v-for="item in withdrawList">
                        <td><span class="ui small header">{{item.name}}</span></td>
                        <td v-if="item.map">{{item.map[item.value]}}</td>
                        <td v-else>{{item.value}}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</template>

<script>
    import tool from 'src/util/tool';
    import util from '_util/index';
    import logic from '_logic';
    export default {
        props: ['id'],
        data(){
            return {
                withdrawMsg: '',
                withdrawData: {},
                withdrawList: {
                    withdraw_id: {name: 'ID', value: ""},
                    nick_name: {name: '用户', value: ""},
                    account_name: {name: '账户姓名', value: ""},
                    account_num: {name: '账户账号', value: ""},
                    money: {name: "金额", value: ""},
                    channel_type:{name:'提现渠道',value:'',map:{
                        1 :'支付宝'}},
                    account_type: {name: '账户类型', value: '',map:{
                        1 :'供应商', 2 :'服务者', 3 : 'app', 4 :'同业者',5:'服务商',10:'积分账户'}},
                    money: {name: '提现金额', value: ""},
                    status: {name: '提现状态', value: "",map:{1:'申请中', 2:'审核成功', 3:'提交第三方', 8:'提现成功', 10:'提现失败', 20:'用户账户修改'}},
                    remark: {name: '备注', value: ""},
                    create_dt: {name: '创建时间', value: ""},
                    update_dt: {name: '更新时间', value: ""},
                },
            }

        },
        watch: {
            id: function () {
                this.getWithdrawDetail()
            }
        },
        created(){
            this.getWithdrawDetail();
        },
        methods: {
            dropdown(json){
                this.dropdownSelect = json
            },
            hideMypop(){
                this.$store.state.eventVue.$emit('hideMypop')
            },
            getWithdrawDetail(){
                this.withdrawMsg = '';
                util.http.getDataCom(this, tool.getApi(this, 'Withdraw', 'withdrawDetail'), {id: this.id}, (rs) => {
                    this.withdrawData = rs[0][0];
                    Object.keys(this.withdrawList).forEach(item => {
                        this.withdrawList[item].value = this.withdrawData[item]
                    });
                    $('.ui.dropdown').dropdown()
                })
            }
        }
    }
</script>

<style lang="less" rel="stylesheet/less" scoped>
    .withdraw-auditfc {
        margin: 0 !important;
        .row {
            .column {
            }
        }

    }
</style>
